home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / freeWAIS-sf-1.1 / ir / query_l.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-09  |  32.8 KB  |  1,349 lines

  1. /* A lexical scanner generated by flex */
  2.  
  3. /* Scanner skeleton version:
  4.  * $Header: flex.skl,v 1.2 94/01/04 14:33:15 vern Exp $
  5.  */
  6.  
  7. #define FLEX_SCANNER
  8.  
  9. #include <stdio.h>
  10.  
  11.  
  12. /* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
  13. #ifdef c_plusplus
  14. #ifndef __cplusplus
  15. #define __cplusplus
  16. #endif
  17. #endif
  18.  
  19.  
  20. #ifdef __cplusplus
  21.  
  22. #include <stdlib.h>
  23. #include <unistd.h>
  24.  
  25. /* Use prototypes in function declarations. */
  26. #define YY_USE_PROTOS
  27.  
  28. /* The "const" storage-class-modifier is valid. */
  29. #define YY_USE_CONST
  30.  
  31. #else    /* ! __cplusplus */
  32.  
  33. #ifdef __STDC__
  34.  
  35. #define YY_USE_PROTOS
  36. #define YY_USE_CONST
  37.  
  38. #endif    /* __STDC__ */
  39. #endif    /* ! __cplusplus */
  40.  
  41.  
  42. #ifdef __TURBOC__
  43. #define YY_USE_CONST
  44. #endif
  45.  
  46.  
  47. #ifndef YY_USE_CONST
  48. #ifndef const
  49. #define const
  50. #endif
  51. #endif
  52.  
  53.  
  54. #ifdef YY_USE_PROTOS
  55. #define YY_PROTO(proto) proto
  56. #else
  57. #define YY_PROTO(proto) ()
  58. #endif
  59.  
  60. /* Returned upon end-of-file. */
  61. #define YY_NULL 0
  62.  
  63. /* Promotes a possibly negative, possibly signed char to an unsigned
  64.  * integer for use as an array index.  If the signed char is negative,
  65.  * we want to instead treat it as an 8-bit unsigned char, hence the
  66.  * double cast.
  67.  */
  68. #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
  69.  
  70. /* Enter a start condition.  This macro really ought to take a parameter,
  71.  * but we do it the disgusting crufty way forced on us by the ()-less
  72.  * definition of BEGIN.
  73.  */
  74. #define BEGIN yy_start = 1 + 2 *
  75.  
  76. /* Translate the current start state into a value that can be later handed
  77.  * to BEGIN to return to the state.
  78.  */
  79. #define YY_START ((yy_start - 1) / 2)
  80.  
  81. /* Action number for EOF rule of a given start state. */
  82. #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
  83.  
  84. /* Special action meaning "start processing a new file".  Now included
  85.  * only for backward compatibility with previous versions of flex.
  86.  */
  87. #define YY_NEW_FILE yyrestart( yyin )
  88.  
  89. #define YY_END_OF_BUFFER_CHAR 0
  90.  
  91. /* Size of default input buffer. */
  92. #define YY_BUF_SIZE 16384
  93.  
  94. typedef struct yy_buffer_state *YY_BUFFER_STATE;
  95.  
  96. extern int yyleng;
  97. extern FILE *yyin, *yyout;
  98.  
  99. #ifdef __cplusplus
  100. extern "C" {
  101. #endif
  102.     extern int yywrap YY_PROTO(( void ));
  103. #ifdef __cplusplus
  104.     }
  105. #endif
  106.  
  107. #define EOB_ACT_CONTINUE_SCAN 0
  108. #define EOB_ACT_END_OF_FILE 1
  109. #define EOB_ACT_LAST_MATCH 2
  110.  
  111. /* The funky do-while in the following #define is used to turn the definition
  112.  * int a single C statement (which needs a semi-colon terminator).  This
  113.  * avoids problems with code like:
  114.  *
  115.  *     if ( condition_holds )
  116.  *        yyless( 5 );
  117.  *    else
  118.  *        do_something_else();
  119.  *
  120.  * Prior to using the do-while the compiler would get upset at the
  121.  * "else" because it interpreted the "if" statement as being all
  122.  * done when it reached the ';' after the yyless() call.
  123.  */
  124.  
  125. /* Return all but the first 'n' matched characters back to the input stream. */
  126.  
  127. #define yyless(n) \
  128.     do \
  129.         { \
  130.         /* Undo effects of setting up yytext. */ \
  131.         *yy_cp = yy_hold_char; \
  132.         yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
  133.         YY_DO_BEFORE_ACTION; /* set up yytext again */ \
  134.         } \
  135.     while ( 0 )
  136.  
  137. #define unput(c) yyunput( c, yytext_ptr )
  138.  
  139.  
  140. struct yy_buffer_state
  141.     {
  142.     FILE *yy_input_file;
  143.  
  144.     char *yy_ch_buf;        /* input buffer */
  145.     char *yy_buf_pos;        /* current position in input buffer */
  146.  
  147.     /* Size of input buffer in bytes, not including room for EOB
  148.      * characters.
  149.      */
  150.     int yy_buf_size;
  151.  
  152.     /* Number of characters read into yy_ch_buf, not including EOB
  153.      * characters.
  154.      */
  155.     int yy_n_chars;
  156.  
  157.     /* Whether this is an "interactive" input source; if so, and
  158.      * if we're using stdio for input, then we want to use getc()
  159.      * instead of fread(), to make sure we stop fetching input after
  160.      * each newline.
  161.      */
  162.     int yy_is_interactive;
  163.  
  164.     /* Whether to try to fill the input buffer when we reach the
  165.      * end of it.
  166.      */
  167.     int yy_fill_buffer;
  168.  
  169.     /* Whether we've seen an EOF on this buffer. */
  170.     int yy_eof_status;
  171. #define EOF_NOT_SEEN 0
  172.     /* "Pending" happens when the EOF has been seen but there's still
  173.      * some text to process.  Note that when we actually see the EOF,
  174.      * we switch the status back to "not seen" (via yyrestart()), so
  175.      * that the user can continue scanning by just pointing yyin at
  176.      * a new input file.
  177.      */
  178. #define EOF_PENDING 1
  179.     };
  180.  
  181. static YY_BUFFER_STATE yy_current_buffer = 0;
  182.  
  183. /* We provide macros for accessing buffer states in case in the
  184.  * future we want to put the buffer states in a more general
  185.  * "scanner state".
  186.  */
  187. #define YY_CURRENT_BUFFER yy_current_buffer
  188.  
  189.  
  190. /* yy_hold_char holds the character lost when yytext is formed. */
  191. static char yy_hold_char;
  192.  
  193. static int yy_n_chars;        /* number of characters read into yy_ch_buf */
  194.  
  195.  
  196. int yyleng;
  197.  
  198. /* Points to current character in buffer. */
  199. static char *yy_c_buf_p = (char *) 0;
  200. static int yy_init = 1;        /* whether we need to initialize */
  201. static int yy_start = 0;    /* start state number */
  202.  
  203. /* Flag which is used to allow yywrap()'s to do buffer switches
  204.  * instead of setting up a fresh yyin.  A bit of a hack ...
  205.  */
  206. static int yy_did_buffer_switch_on_eof;
  207.  
  208. static void yyunput YY_PROTO(( int c, char *buf_ptr ));
  209. void yyrestart YY_PROTO(( FILE *input_file ));
  210. void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
  211. void yy_load_buffer_state YY_PROTO(( void ));
  212. YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
  213. void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
  214. void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
  215.  
  216. static int yy_start_stack_ptr = 0;
  217. static int yy_start_stack_depth = 0;
  218. static int *yy_start_stack = 0;
  219. static void yy_push_state YY_PROTO(( int new_state ));
  220. static void yy_pop_state YY_PROTO(( void ));
  221. static int yy_top_state YY_PROTO(( void ));
  222.  
  223. #ifndef yytext_ptr
  224. static void yy_flex_strcpy YY_PROTO(( char *, const char * ));
  225. #endif
  226.  
  227. static void *yy_flex_alloc YY_PROTO(( unsigned int ));
  228. static void *yy_flex_realloc YY_PROTO(( void *ptr, unsigned int ));
  229. static void yy_flex_free YY_PROTO(( void * ));
  230.  
  231. #define yy_new_buffer yy_create_buffer
  232.  
  233. #define INITIAL 0
  234. typedef unsigned char YY_CHAR;
  235. typedef int yy_state_type;
  236. FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
  237. extern char *yytext;
  238. #define yytext_ptr yytext
  239.  
  240. #ifdef __cplusplus
  241. static int yyinput YY_PROTO(( void ));
  242. #else
  243. static int input YY_PROTO(( void ));
  244. #endif
  245.  
  246. static yy_state_type yy_get_previous_state YY_PROTO(( void ));
  247. static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
  248. static int yy_get_next_buffer YY_PROTO(( void ));
  249. static void yy_fatal_error YY_PROTO(( const char msg[] ));
  250.  
  251. /* Done after the current pattern has been matched and before the
  252.  * corresponding action - sets up yytext.
  253.  */
  254. #define YY_DO_BEFORE_ACTION \
  255.     yytext_ptr = yy_bp; \
  256.     yyleng = yy_cp - yy_bp; \
  257.     yy_hold_char = *yy_cp; \
  258.     *yy_cp = '\0'; \
  259.     yy_c_buf_p = yy_cp;
  260.  
  261. #define YY_END_OF_BUFFER 12
  262. static const short int yy_accept[47] =
  263.     {   0,
  264.         0,    0,   12,    8,    5,    8,    8,    4,    8,    8,
  265.         8,    8,    8,    8,    8,    8,    8,    8,    0,    8,
  266.         8,    0,    8,    8,    8,    8,    8,    2,    8,    8,
  267.         8,    8,   10,    9,    1,    3,    8,    8,    8,    8,
  268.         8,    8,    6,    8,    7,    0
  269.     } ;
  270.  
  271. static const int yy_ec[256] =
  272.     {   0,
  273.         1,    1,    1,    1,    1,    1,    1,    1,    2,    2,
  274.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  275.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  276.         1,    2,    1,    3,    1,    1,    1,    1,    4,    5,
  277.         5,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  278.         1,    1,    1,    1,    1,    1,    1,    1,    1,    5,
  279.         5,    5,    1,    1,    6,    1,    1,    7,    1,    1,
  280.         1,    1,    1,    1,    1,    1,    1,    8,    9,    1,
  281.         1,   10,    1,   11,    1,    1,    1,    1,    1,    1,
  282.         1,    1,    1,    1,    1,    1,   12,    1,    1,   13,
  283.  
  284.        14,    1,    1,   15,   16,    1,    1,    1,    1,   17,
  285.        18,   19,    1,   20,   21,   22,   23,    1,    1,   24,
  286.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  287.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  288.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  289.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  290.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  291.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  292.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  293.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  294.  
  295.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  296.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  297.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  298.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  299.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  300.         1,    1,    1,    1,    1
  301.     } ;
  302.  
  303. static const int yy_meta[25] =
  304.     {   0,
  305.         1,    2,    1,    1,    2,    1,    1,    1,    1,    1,
  306.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  307.         1,    1,    1,    1
  308.     } ;
  309.  
  310. static const short int yy_base[52] =
  311.     {   0,
  312.         0,    0,   74,    0,   75,   23,   25,   75,   23,   23,
  313.        23,   56,   54,   51,   55,   51,    0,   32,   65,    0,
  314.        34,   63,    0,   59,   52,   53,   41,    0,   49,   39,
  315.        42,   36,   75,   75,    0,    0,   41,   40,   40,   42,
  316.        30,   39,    0,   28,    0,   75,   41,   43,   45,   47,
  317.        49
  318.     } ;
  319.  
  320. static const short int yy_def[52] =
  321.     {   0,
  322.        46,    1,   46,   47,   46,   48,   49,   46,   47,   47,
  323.        47,   47,   47,   47,   47,   47,   47,   48,   50,   47,
  324.        49,   51,   47,   47,   47,   47,   47,   47,   47,   47,
  325.        47,   47,   46,   46,   47,   47,   47,   47,   47,   47,
  326.        47,   47,   47,   47,   47,    0,   46,   46,   46,   46,
  327.        46
  328.     } ;
  329.  
  330. static const short int yy_nxt[100] =
  331.     {   0,
  332.         4,    5,    6,    7,    8,    9,    4,   10,   11,    4,
  333.         4,   12,    4,    4,    4,    4,   13,   14,   15,    4,
  334.        16,    4,    4,    4,   19,   20,   22,   19,   23,   22,
  335.        24,   26,   28,   19,   20,   22,   19,   23,   22,   25,
  336.        27,   17,   28,   18,   18,   21,   21,   19,   19,   22,
  337.        22,   45,   44,   43,   42,   41,   40,   39,   38,   37,
  338.        36,   35,   36,   36,   35,   35,   34,   33,   32,   31,
  339.        28,   30,   29,   46,    3,   46,   46,   46,   46,   46,
  340.        46,   46,   46,   46,   46,   46,   46,   46,   46,   46,
  341.        46,   46,   46,   46,   46,   46,   46,   46,   46
  342.  
  343.     } ;
  344.  
  345. static const short int yy_chk[100] =
  346.     {   0,
  347.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  348.         1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
  349.         1,    1,    1,    1,    6,    6,    7,    6,    7,    7,
  350.         9,   10,   11,   18,   18,   21,   18,   21,   21,    9,
  351.        10,   47,   11,   48,   48,   49,   49,   50,   50,   51,
  352.        51,   44,   42,   41,   40,   39,   38,   37,   32,   31,
  353.        30,   29,   27,   26,   25,   24,   22,   19,   16,   15,
  354.        14,   13,   12,    3,   46,   46,   46,   46,   46,   46,
  355.        46,   46,   46,   46,   46,   46,   46,   46,   46,   46,
  356.        46,   46,   46,   46,   46,   46,   46,   46,   46
  357.  
  358.     } ;
  359.  
  360. static yy_state_type yy_last_accepting_state;
  361. static char *yy_last_accepting_cpos;
  362.  
  363. /* The intent behind this definition is that it'll catch
  364.  * any uses of REJECT which flex missed.
  365.  */
  366. #define REJECT reject_used_but_not_detected
  367. #define yymore() yymore_used_but_not_detected
  368. #define YY_MORE_ADJ 0
  369. char *yytext;
  370. # line 1 "query_l.l"
  371. # line 2 "query_l.l"
  372. /*                               -*- Mode: C -*- 
  373.  * qyery_l.l -- 
  374.  * ITIID           : $ITI$ $Header $__Header$
  375.  * Author          : Ulrich Pfeifer
  376.  * Created On      : Tue Feb 15 16:03:22 1994
  377.  * Last Modified By: Ulrich Pfeifer
  378.  * Last Modified On: Mon Oct 10 12:45:32 1994
  379.  * Update Count    : 36
  380.  * Status          : Unknown, Use with caution!
  381.  */
  382.  
  383.  
  384. /* HISTORY 
  385.  * 23-Mar-1994        Ulrich Pfeifer    
  386.  *    Last Modified: Wed Mar 23 11:09:53 1994 #29 (Ulrich Pfeifer)
  387.  *    Added flex support
  388.  * 10-Mar-1994        Ulrich Pfeifer    
  389.  *    Support for literal searches
  390.  */
  391.  
  392. #include "query_token.h"
  393. #include "cutil.h"
  394.  
  395. #undef  ECHO
  396. #define ECHO 
  397. /*
  398. [Oo][Rr]
  399. [Nn][Oo][Tt] 
  400. */
  401. extern char* yybuf;
  402. #ifdef FLEX_SCANNER
  403. int yylineno = 0;
  404. #undef yywrap
  405. #define yywrap() (yyrestart(yyin),1)
  406.  
  407. #undef YY_INPUT
  408. #define YY_INPUT(buf,result,max_size) \
  409.                   { \
  410.                   int c = *(yybuf++); \
  411.                   if (c=='\n') yylineno++; \
  412.                   result = (c == '\0') ? YY_NULL : (buf[0] = c, 1); \
  413.                   }
  414. #else
  415. #undef input
  416. #define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):*(yybuf++))==10?(yylineno++,yytchar):yytchar)=='\0'?0:yytchar)
  417. #endif
  418.  
  419. /* Macros after this point can all be overridden by user definitions in
  420.  * section 1.
  421.  */
  422.  
  423. #ifdef YY_MALLOC_DECL
  424. YY_MALLOC_DECL
  425. #else
  426. #if __STDC__
  427. #ifndef __cplusplus
  428. #include <stdlib.h>
  429. #endif
  430. #else
  431. /* Just try to get by without declaring the routines.  This will fail
  432.  * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
  433.  * or sizeof(void*) != sizeof(int).
  434.  */
  435. #endif
  436. #endif
  437.  
  438. /* Amount of stuff to slurp up with each read. */
  439. #ifndef YY_READ_BUF_SIZE
  440. #define YY_READ_BUF_SIZE 8192
  441. #endif
  442.  
  443. /* Copy whatever the last rule matched to the standard output. */
  444.  
  445. #ifndef ECHO
  446. /* This used to be an fputs(), but since the string might contain NUL's,
  447.  * we now use fwrite().
  448.  */
  449. #define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
  450. #endif
  451.  
  452. /* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
  453.  * is returned in "result".
  454.  */
  455. #ifndef YY_INPUT
  456. #define YY_INPUT(buf,result,max_size) \
  457.     if ( yy_current_buffer->yy_is_interactive ) \
  458.         { \
  459.         int c = getc( yyin ); \
  460.         result = c == EOF ? 0 : 1; \
  461.         buf[0] = (char) c; \
  462.         } \
  463.     else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
  464.           && ferror( yyin ) ) \
  465.         YY_FATAL_ERROR( "input in flex scanner failed" );
  466. #endif
  467.  
  468. /* No semi-colon after return; correct usage is to write "yyterminate();" -
  469.  * we don't want an extra ';' after the "return" because that will cause
  470.  * some compilers to complain about unreachable statements.
  471.  */
  472. #ifndef yyterminate
  473. #define yyterminate() return YY_NULL
  474. #endif
  475.  
  476. /* Number of entries by which start-condition stack grows. */
  477. #ifndef YY_START_STACK_INCR
  478. #define YY_START_STACK_INCR 25
  479. #endif
  480.  
  481. /* Report a fatal error. */
  482. #ifndef YY_FATAL_ERROR
  483. #define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
  484. #endif
  485.  
  486. /* Default declaration of generated scanner - a define so the user can
  487.  * easily add parameters.
  488.  */
  489. #ifndef YY_DECL
  490. #define YY_DECL int yylex YY_PROTO(( void ))
  491. #endif
  492.  
  493. /* Code executed at the beginning of each rule, after yytext and yyleng
  494.  * have been set up.
  495.  */
  496. #ifndef YY_USER_ACTION
  497. #define YY_USER_ACTION
  498. #endif
  499.  
  500. /* Code executed at the end of each rule. */
  501. #ifndef YY_BREAK
  502. #define YY_BREAK break;
  503. #endif
  504.  
  505. YY_DECL
  506.     {
  507.     register yy_state_type yy_current_state;
  508.     register char *yy_cp, *yy_bp;
  509.     register int yy_act;
  510.  
  511. # line 50 "query_l.l"
  512.  
  513.  
  514.     if ( yy_init )
  515.         {
  516. #ifdef YY_USER_INIT
  517.         YY_USER_INIT;
  518. #endif
  519.  
  520.         if ( ! yy_start )
  521.             yy_start = 1;    /* first start state */
  522.  
  523.         if ( ! yyin )
  524.             yyin = stdin;
  525.  
  526.         if ( ! yyout )
  527.             yyout = stdout;
  528.  
  529.         if ( yy_current_buffer )
  530.             yy_init_buffer( yy_current_buffer, yyin );
  531.         else
  532.             yy_current_buffer =
  533.                 yy_create_buffer( yyin, YY_BUF_SIZE );
  534.  
  535.         yy_load_buffer_state();
  536.  
  537.         yy_init = 0;
  538.         }
  539.  
  540.     while ( 1 )        /* loops until end-of-file is reached */
  541.         {
  542.         yy_cp = yy_c_buf_p;
  543.  
  544.         /* Support of yytext. */
  545.         *yy_cp = yy_hold_char;
  546.  
  547.         /* yy_bp points to the position in yy_ch_buf of the start of
  548.          * the current run.
  549.          */
  550.         yy_bp = yy_cp;
  551.  
  552.         yy_current_state = yy_start;
  553. yy_match:
  554.         do
  555.             {
  556.             register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
  557.             if ( yy_accept[yy_current_state] )
  558.                 {
  559.                 yy_last_accepting_state = yy_current_state;
  560.                 yy_last_accepting_cpos = yy_cp;
  561.                 }
  562.             while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  563.                 {
  564.                 yy_current_state = (int) yy_def[yy_current_state];
  565.                 if ( yy_current_state >= 47 )
  566.                     yy_c = yy_meta[(unsigned int) yy_c];
  567.                 }
  568.             yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  569.             ++yy_cp;
  570.             }
  571.         while ( yy_base[yy_current_state] != 75 );
  572.  
  573. yy_find_action:
  574.         yy_act = yy_accept[yy_current_state];
  575.  
  576.         YY_DO_BEFORE_ACTION;
  577.  
  578.  
  579. do_action:    /* This label is used only to access EOF actions. */
  580.  
  581.  
  582.         switch ( yy_act )
  583.     { /* beginning of action switch */
  584.             case 0: /* must back up */
  585.             /* undo the effects of YY_DO_BEFORE_ACTION */
  586.             *yy_cp = yy_hold_char;
  587.             yy_cp = yy_last_accepting_cpos;
  588.             yy_current_state = yy_last_accepting_state;
  589.             goto yy_find_action;
  590.  
  591. case 1:
  592. YY_USER_ACTION
  593. # line 51 "query_l.l"
  594. { ECHO; return(AND); }
  595.     YY_BREAK
  596. case 2:
  597. YY_USER_ACTION
  598. # line 52 "query_l.l"
  599. { ECHO; return(OR); }
  600.     YY_BREAK
  601. case 3:
  602. YY_USER_ACTION
  603. # line 53 "query_l.l"
  604. { ECHO; return(NOT); }
  605.     YY_BREAK
  606. case 4:
  607. YY_USER_ACTION
  608. # line 54 "query_l.l"
  609. { ECHO; return(yytext[0]); }
  610.     YY_BREAK
  611. case 5:
  612. YY_USER_ACTION
  613. # line 55 "query_l.l"
  614. { ECHO; }
  615.     YY_BREAK
  616. case 6:
  617. YY_USER_ACTION
  618. # line 56 "query_l.l"
  619. { ECHO; yylval.sval = s_strdup(yytext); return(PHONIX);}
  620.     YY_BREAK
  621. case 7:
  622. YY_USER_ACTION
  623. # line 57 "query_l.l"
  624. { ECHO; yylval.sval = s_strdup(yytext); return(SOUNDEX);}
  625.     YY_BREAK
  626. case 8:
  627. YY_USER_ACTION
  628. # line 58 "query_l.l"
  629. { char *s; 
  630.                     ECHO; yylval.sval = s_strdup(yytext); 
  631. #ifdef NOPAIRS
  632.                     for (s=yylval.sval;*s;*s=tolower(*s),s++);
  633. #endif /* NOPAIRS */
  634.                     return(WORD);}
  635.     YY_BREAK
  636. case 9:
  637. YY_USER_ACTION
  638. # line 64 "query_l.l"
  639. { ECHO; yylval.sval = s_strdup(yytext); return(WORD);}
  640.     YY_BREAK
  641. case 10:
  642. YY_USER_ACTION
  643. # line 65 "query_l.l"
  644. { ECHO; yylval.sval = s_strdup(yytext); return(WORD);}
  645.     YY_BREAK
  646. case 11:
  647. YY_USER_ACTION
  648. # line 66 "query_l.l"
  649. ECHO;
  650.     YY_BREAK
  651. case YY_STATE_EOF(INITIAL):
  652.     yyterminate();
  653.  
  654.     case YY_END_OF_BUFFER:
  655.         {
  656.         /* Amount of text matched not including the EOB char. */
  657.         int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;
  658.  
  659.         /* Undo the effects of YY_DO_BEFORE_ACTION. */
  660.         *yy_cp = yy_hold_char;
  661.  
  662.         if ( yy_current_buffer->yy_input_file != yyin )
  663.             {
  664.             /* This can happen if we scan a file, yywrap() returns
  665.              * 1, and then later the user points yyin at a new
  666.              * file to resume scanning.  We have to assure
  667.              * consistency between yy_current_buffer and our
  668.              * globals.  Here is the right place to do so, because
  669.              * this is the first action (other than possibly a
  670.              * back-up) that will match for the new input file.
  671.              */
  672.             yy_current_buffer->yy_input_file = yyin;
  673.             yy_n_chars = yy_current_buffer->yy_n_chars;
  674.             }
  675.  
  676.         /* Note that here we test for yy_c_buf_p "<=" to the position
  677.          * of the first EOB in the buffer, since yy_c_buf_p will
  678.          * already have been incremented past the NUL character
  679.          * (since all states make transitions on EOB to the
  680.          * end-of-buffer state).  Contrast this with the test
  681.          * in input().
  682.          */
  683.         if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  684.             { /* This was really a NUL. */
  685.             yy_state_type yy_next_state;
  686.  
  687.             yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
  688.  
  689.             yy_current_state = yy_get_previous_state();
  690.  
  691.             /* Okay, we're now positioned to make the NUL
  692.              * transition.  We couldn't have
  693.              * yy_get_previous_state() go ahead and do it
  694.              * for us because it doesn't know how to deal
  695.              * with the possibility of jamming (and we don't
  696.              * want to build jamming into it because then it
  697.              * will run more slowly).
  698.              */
  699.  
  700.             yy_next_state = yy_try_NUL_trans( yy_current_state );
  701.  
  702.             yy_bp = yytext_ptr + YY_MORE_ADJ;
  703.  
  704.             if ( yy_next_state )
  705.                 {
  706.                 /* Consume the NUL. */
  707.                 yy_cp = ++yy_c_buf_p;
  708.                 yy_current_state = yy_next_state;
  709.                 goto yy_match;
  710.                 }
  711.  
  712.             else
  713.                 {
  714.                 goto yy_find_action;
  715.                 }
  716.             }
  717.  
  718.         else switch ( yy_get_next_buffer() )
  719.             {
  720.             case EOB_ACT_END_OF_FILE:
  721.                 {
  722.                 yy_did_buffer_switch_on_eof = 0;
  723.  
  724.                 if ( yywrap() )
  725.                     {
  726.                     /* Note: because we've taken care in
  727.                      * yy_get_next_buffer() to have set up
  728.                      * yytext, we can now set up
  729.                      * yy_c_buf_p so that if some total
  730.                      * hoser (like flex itself) wants to
  731.                      * call the scanner after we return the
  732.                      * YY_NULL, it'll still work - another
  733.                      * YY_NULL will get returned.
  734.                      */
  735.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  736.  
  737.                     yy_act = YY_STATE_EOF(YY_START);
  738.                     goto do_action;
  739.                     }
  740.  
  741.                 else
  742.                     {
  743.                     if ( ! yy_did_buffer_switch_on_eof )
  744.                         YY_NEW_FILE;
  745.                     }
  746.                 break;
  747.                 }
  748.  
  749.             case EOB_ACT_CONTINUE_SCAN:
  750.                 yy_c_buf_p =
  751.                     yytext_ptr + yy_amount_of_matched_text;
  752.  
  753.                 yy_current_state = yy_get_previous_state();
  754.  
  755.                 yy_cp = yy_c_buf_p;
  756.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  757.                 goto yy_match;
  758.  
  759.             case EOB_ACT_LAST_MATCH:
  760.                 yy_c_buf_p =
  761.                 &yy_current_buffer->yy_ch_buf[yy_n_chars];
  762.  
  763.                 yy_current_state = yy_get_previous_state();
  764.  
  765.                 yy_cp = yy_c_buf_p;
  766.                 yy_bp = yytext_ptr + YY_MORE_ADJ;
  767.                 goto yy_find_action;
  768.             }
  769.         break;
  770.         }
  771.  
  772.     default:
  773.         YY_FATAL_ERROR(
  774.             "fatal flex scanner internal error--no action found" );
  775.     } /* end of action switch */
  776.         } /* end of scanning one token */
  777.     } /* end of yylex */
  778.  
  779.  
  780. /* yy_get_next_buffer - try to read in a new buffer
  781.  *
  782.  * Returns a code representing an action:
  783.  *    EOB_ACT_LAST_MATCH -
  784.  *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position
  785.  *    EOB_ACT_END_OF_FILE - end of file
  786.  */
  787.  
  788. static int yy_get_next_buffer()
  789.     {
  790.     register char *dest = yy_current_buffer->yy_ch_buf;
  791.     register char *source = yytext_ptr - 1; /* copy prev. char, too */
  792.     register int number_to_move, i;
  793.     int ret_val;
  794.  
  795.     if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
  796.         YY_FATAL_ERROR(
  797.         "fatal flex scanner internal error--end of buffer missed" );
  798.  
  799.     if ( yy_current_buffer->yy_fill_buffer == 0 )
  800.         { /* Don't try to fill the buffer, so this is an EOF. */
  801.         if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
  802.             {
  803.             /* We matched a singled characater, the EOB, so
  804.              * treat this as a final EOF.
  805.              */
  806.             return EOB_ACT_END_OF_FILE;
  807.             }
  808.  
  809.         else
  810.             {
  811.             /* We matched some text prior to the EOB, first
  812.              * process it.
  813.              */
  814.             return EOB_ACT_LAST_MATCH;
  815.             }
  816.         }
  817.  
  818.     /* Try to read more data. */
  819.  
  820.     /* First move last chars to start of buffer. */
  821.     number_to_move = yy_c_buf_p - yytext_ptr;
  822.  
  823.     for ( i = 0; i < number_to_move; ++i )
  824.         *(dest++) = *(source++);
  825.  
  826.     if ( yy_current_buffer->yy_eof_status != EOF_NOT_SEEN )
  827.         /* don't do the read, it's not guaranteed to return an EOF,
  828.          * just force an EOF
  829.          */
  830.         yy_n_chars = 0;
  831.  
  832.     else
  833.         {
  834.         int num_to_read =
  835.             yy_current_buffer->yy_buf_size - number_to_move - 1;
  836.  
  837.         while ( num_to_read <= 0 )
  838.             { /* Not enough room in the buffer - grow it. */
  839. #ifdef YY_USES_REJECT
  840.             YY_FATAL_ERROR(
  841. "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
  842. #else
  843.  
  844.             /* just a shorter name for the current buffer */
  845.             YY_BUFFER_STATE b = yy_current_buffer;
  846.  
  847.             int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;
  848.  
  849.             b->yy_buf_size *= 2;
  850.             b->yy_ch_buf = (char *)
  851.                 yy_flex_realloc( (void *) b->yy_ch_buf,
  852.                          b->yy_buf_size );
  853.  
  854.             if ( ! b->yy_ch_buf )
  855.                 YY_FATAL_ERROR(
  856.                 "fatal error - scanner input buffer overflow" );
  857.  
  858.             yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
  859.  
  860.             num_to_read = yy_current_buffer->yy_buf_size -
  861.                         number_to_move - 1;
  862. #endif
  863.             }
  864.  
  865.         if ( num_to_read > YY_READ_BUF_SIZE )
  866.             num_to_read = YY_READ_BUF_SIZE;
  867.  
  868.         /* Read in more data. */
  869.         YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
  870.             yy_n_chars, num_to_read );
  871.         }
  872.  
  873.     if ( yy_n_chars == 0 )
  874.         {
  875.         if ( number_to_move - YY_MORE_ADJ == 1 )
  876.             {
  877.             ret_val = EOB_ACT_END_OF_FILE;
  878.             yyrestart( yyin );
  879.             }
  880.  
  881.         else
  882.             {
  883.             ret_val = EOB_ACT_LAST_MATCH;
  884.             yy_current_buffer->yy_eof_status = EOF_PENDING;
  885.             }
  886.         }
  887.  
  888.     else
  889.         ret_val = EOB_ACT_CONTINUE_SCAN;
  890.  
  891.     yy_n_chars += number_to_move;
  892.     yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
  893.     yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
  894.  
  895.     /* yytext begins at the second character in yy_ch_buf; the first
  896.      * character is the one which preceded it before reading in the latest
  897.      * buffer; it needs to be kept around in case it's a newline, so
  898.      * yy_get_previous_state() will have with '^' rules active.
  899.      */
  900.  
  901.     yytext_ptr = &yy_current_buffer->yy_ch_buf[1];
  902.  
  903.     return ret_val;
  904.     }
  905.  
  906.  
  907. /* yy_get_previous_state - get the state just before the EOB char was reached */
  908.  
  909. static yy_state_type yy_get_previous_state()
  910.     {
  911.     register yy_state_type yy_current_state;
  912.     register char *yy_cp;
  913.  
  914.     yy_current_state = yy_start;
  915.  
  916.     for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
  917.         {
  918.         register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
  919.         if ( yy_accept[yy_current_state] )
  920.             {
  921.             yy_last_accepting_state = yy_current_state;
  922.             yy_last_accepting_cpos = yy_cp;
  923.             }
  924.         while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  925.             {
  926.             yy_current_state = (int) yy_def[yy_current_state];
  927.             if ( yy_current_state >= 47 )
  928.                 yy_c = yy_meta[(unsigned int) yy_c];
  929.             }
  930.         yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  931.         }
  932.  
  933.     return yy_current_state;
  934.     }
  935.  
  936.  
  937. /* yy_try_NUL_trans - try to make a transition on the NUL character
  938.  *
  939.  * synopsis
  940.  *    next_state = yy_try_NUL_trans( current_state );
  941.  */
  942.  
  943. #ifdef YY_USE_PROTOS
  944. static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
  945. #else
  946. static yy_state_type yy_try_NUL_trans( yy_current_state )
  947. yy_state_type yy_current_state;
  948. #endif
  949.     {
  950.     register int yy_is_jam;
  951.     register char *yy_cp = yy_c_buf_p;
  952.  
  953.     register YY_CHAR yy_c = 1;
  954.     if ( yy_accept[yy_current_state] )
  955.         {
  956.         yy_last_accepting_state = yy_current_state;
  957.         yy_last_accepting_cpos = yy_cp;
  958.         }
  959.     while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
  960.         {
  961.         yy_current_state = (int) yy_def[yy_current_state];
  962.         if ( yy_current_state >= 47 )
  963.             yy_c = yy_meta[(unsigned int) yy_c];
  964.         }
  965.     yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
  966.     yy_is_jam = (yy_current_state == 46);
  967.  
  968.     return yy_is_jam ? 0 : yy_current_state;
  969.     }
  970.  
  971.  
  972. #ifdef YY_USE_PROTOS
  973. static void yyunput( int c, register char *yy_bp )
  974. #else
  975. static void yyunput( c, yy_bp )
  976. int c;
  977. register char *yy_bp;
  978. #endif
  979.     {
  980.     register char *yy_cp = yy_c_buf_p;
  981.  
  982.     /* undo effects of setting up yytext */
  983.     *yy_cp = yy_hold_char;
  984.  
  985.     if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  986.         { /* need to shift things up to make room */
  987.         /* +2 for EOB chars. */
  988.         register int number_to_move = yy_n_chars + 2;
  989.         register char *dest = &yy_current_buffer->yy_ch_buf[
  990.                     yy_current_buffer->yy_buf_size + 2];
  991.         register char *source =
  992.                 &yy_current_buffer->yy_ch_buf[number_to_move];
  993.  
  994.         while ( source > yy_current_buffer->yy_ch_buf )
  995.             *--dest = *--source;
  996.  
  997.         yy_cp += dest - source;
  998.         yy_bp += dest - source;
  999.         yy_n_chars = yy_current_buffer->yy_buf_size;
  1000.  
  1001.         if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
  1002.             YY_FATAL_ERROR( "flex scanner push-back overflow" );
  1003.         }
  1004.  
  1005.     if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
  1006.         yy_cp[-2] = '\n';
  1007.  
  1008.     *--yy_cp = (char) c;
  1009.  
  1010.  
  1011.     /* Note: the formal parameter *must* be called "yy_bp" for this
  1012.      * macro to now work correctly.
  1013.      */
  1014.     YY_DO_BEFORE_ACTION; /* set up yytext again */
  1015.     }
  1016.  
  1017.  
  1018. #ifdef __cplusplus
  1019. static int yyinput()
  1020. #else
  1021. static int input()
  1022. #endif
  1023.     {
  1024.     int c;
  1025.  
  1026.     *yy_c_buf_p = yy_hold_char;
  1027.  
  1028.     if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
  1029.         {
  1030.         /* yy_c_buf_p now points to the character we want to return.
  1031.          * If this occurs *before* the EOB characters, then it's a
  1032.          * valid NUL; if not, then we've hit the end of the buffer.
  1033.          */
  1034.         if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
  1035.             /* This was really a NUL. */
  1036.             *yy_c_buf_p = '\0';
  1037.  
  1038.         else
  1039.             { /* need more input */
  1040.             yytext_ptr = yy_c_buf_p;
  1041.             ++yy_c_buf_p;
  1042.  
  1043.             switch ( yy_get_next_buffer() )
  1044.                 {
  1045.                 case EOB_ACT_END_OF_FILE:
  1046.                     {
  1047.                     if ( yywrap() )
  1048.                         {
  1049.                         yy_c_buf_p =
  1050.                         yytext_ptr + YY_MORE_ADJ;
  1051.                         return EOF;
  1052.                         }
  1053.  
  1054.                     YY_NEW_FILE;
  1055. #ifdef __cplusplus
  1056.                     return yyinput();
  1057. #else
  1058.                     return input();
  1059. #endif
  1060.                     }
  1061.  
  1062.                 case EOB_ACT_CONTINUE_SCAN:
  1063.                     yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
  1064.                     break;
  1065.  
  1066.                 case EOB_ACT_LAST_MATCH:
  1067. #ifdef __cplusplus
  1068.                     YY_FATAL_ERROR(
  1069.                     "unexpected last match in yyinput()" );
  1070. #else
  1071.                     YY_FATAL_ERROR(
  1072.                     "unexpected last match in input()" );
  1073. #endif
  1074.                 }
  1075.             }
  1076.         }
  1077.  
  1078.     c = *yy_c_buf_p;
  1079.     *yy_c_buf_p = '\0';    /* preserve yytext */
  1080.     yy_hold_char = *++yy_c_buf_p;
  1081.  
  1082.     return c;
  1083.     }
  1084.  
  1085.  
  1086. #ifdef YY_USE_PROTOS
  1087. void yyrestart( FILE *input_file )
  1088. #else
  1089. void yyrestart( input_file )
  1090. FILE *input_file;
  1091. #endif
  1092.     {
  1093.     if ( ! yy_current_buffer )
  1094.         yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
  1095.  
  1096.     yy_init_buffer( yy_current_buffer, input_file );
  1097.     yy_load_buffer_state();
  1098.     }
  1099.  
  1100.  
  1101. #ifdef YY_USE_PROTOS
  1102. void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
  1103. #else
  1104. void yy_switch_to_buffer( new_buffer )
  1105. YY_BUFFER_STATE new_buffer;
  1106. #endif
  1107.     {
  1108.     if ( yy_current_buffer == new_buffer )
  1109.         return;
  1110.  
  1111.     if ( yy_current_buffer )
  1112.         {
  1113.         /* Flush out information for old buffer. */
  1114.         *yy_c_buf_p = yy_hold_char;
  1115.         yy_current_buffer->yy_buf_pos = yy_c_buf_p;
  1116.         yy_current_buffer->yy_n_chars = yy_n_chars;
  1117.         }
  1118.  
  1119.     yy_current_buffer = new_buffer;
  1120.     yy_load_buffer_state();
  1121.  
  1122.     /* We don't actually know whether we did this switch during
  1123.      * EOF (yywrap()) processing, but the only time this flag
  1124.      * is looked at is after yywrap() is called, so it's safe
  1125.      * to go ahead and always set it.
  1126.      */
  1127.     yy_did_buffer_switch_on_eof = 1;
  1128.     }
  1129.  
  1130.  
  1131. #ifdef YY_USE_PROTOS
  1132. void yy_load_buffer_state( void )
  1133. #else
  1134. void yy_load_buffer_state()
  1135. #endif
  1136.     {
  1137.     yy_n_chars = yy_current_buffer->yy_n_chars;
  1138.     yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
  1139.     yyin = yy_current_buffer->yy_input_file;
  1140.     yy_hold_char = *yy_c_buf_p;
  1141.     }
  1142.  
  1143.  
  1144. #ifdef YY_USE_PROTOS
  1145. YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
  1146. #else
  1147. YY_BUFFER_STATE yy_create_buffer( file, size )
  1148. FILE *file;
  1149. int size;
  1150. #endif
  1151.     {
  1152.     YY_BUFFER_STATE b;
  1153.  
  1154.     b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
  1155.  
  1156.     if ( ! b )
  1157.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1158.  
  1159.     b->yy_buf_size = size;
  1160.  
  1161.     /* yy_ch_buf has to be 2 characters longer than the size given because
  1162.      * we need to put in 2 end-of-buffer characters.
  1163.      */
  1164.     b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
  1165.  
  1166.     if ( ! b->yy_ch_buf )
  1167.         YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
  1168.  
  1169.     yy_init_buffer( b, file );
  1170.  
  1171.     return b;
  1172.     }
  1173.  
  1174.  
  1175. #ifdef YY_USE_PROTOS
  1176. void yy_delete_buffer( YY_BUFFER_STATE b )
  1177. #else
  1178. void yy_delete_buffer( b )
  1179. YY_BUFFER_STATE b;
  1180. #endif
  1181.     {
  1182.     if ( b == yy_current_buffer )
  1183.         yy_current_buffer = (YY_BUFFER_STATE) 0;
  1184.  
  1185.     yy_flex_free( (void *) b->yy_ch_buf );
  1186.     yy_flex_free( (void *) b );
  1187.     }
  1188.  
  1189.  
  1190. #ifdef YY_USE_PROTOS
  1191. void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
  1192. #else
  1193. void yy_init_buffer( b, file )
  1194. YY_BUFFER_STATE b;
  1195. FILE *file;
  1196. #endif
  1197.     {
  1198.     b->yy_input_file = file;
  1199.  
  1200.     /* We put in the '\n' and start reading from [1] so that an
  1201.      * initial match-at-newline will be true.
  1202.      */
  1203.  
  1204.     b->yy_ch_buf[0] = '\n';
  1205.     b->yy_n_chars = 1;
  1206.  
  1207.     /* We always need two end-of-buffer characters.  The first causes
  1208.      * a transition to the end-of-buffer state.  The second causes
  1209.      * a jam in that state.
  1210.      */
  1211.     b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
  1212.     b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
  1213.  
  1214.     b->yy_buf_pos = &b->yy_ch_buf[1];
  1215.  
  1216.     b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;
  1217.  
  1218.     b->yy_fill_buffer = 1;
  1219.  
  1220.     b->yy_eof_status = EOF_NOT_SEEN;
  1221.     }
  1222.  
  1223.  
  1224. #ifdef YY_USE_PROTOS
  1225. static void yy_push_state( int new_state )
  1226. #else
  1227. static void yy_push_state( new_state )
  1228. int new_state;
  1229. #endif
  1230.     {
  1231.     if ( yy_start_stack_ptr >= yy_start_stack_depth )
  1232.         {
  1233.         int new_size;
  1234.  
  1235.         yy_start_stack_depth += YY_START_STACK_INCR;
  1236.         new_size = yy_start_stack_depth * sizeof( int );
  1237.  
  1238.         if ( ! yy_start_stack )
  1239.             yy_start_stack = (int *) yy_flex_alloc( new_size );
  1240.  
  1241.         else
  1242.             yy_start_stack = (int *) yy_flex_realloc(
  1243.                     (void *) yy_start_stack, new_size );
  1244.  
  1245.         if ( ! yy_start_stack )
  1246.             YY_FATAL_ERROR(
  1247.             "out of memory expanding start-condition stack" );
  1248.         }
  1249.  
  1250.     yy_start_stack[yy_start_stack_ptr++] = YY_START;
  1251.  
  1252.     BEGIN(new_state);
  1253.     }
  1254.  
  1255.  
  1256. static void yy_pop_state()
  1257.     {
  1258.     if ( --yy_start_stack_ptr < 0 )
  1259.         YY_FATAL_ERROR( "start-condition stack underflow" );
  1260.  
  1261.     BEGIN(yy_start_stack[yy_start_stack_ptr]);
  1262.     }
  1263.  
  1264.  
  1265. static int yy_top_state()
  1266.     {
  1267.     return yy_start_stack[yy_start_stack_ptr - 1];
  1268.     }
  1269.  
  1270.  
  1271. #ifdef YY_USE_PROTOS
  1272. static void yy_fatal_error( const char msg[] )
  1273. #else
  1274. static void yy_fatal_error( msg )
  1275. char msg[];
  1276. #endif
  1277.     {
  1278.     (void) fprintf( stderr, "%s\n", msg );
  1279.     exit( 1 );
  1280.     }
  1281.  
  1282.  
  1283.  
  1284. /* Redefine yyless() so it works in section 3 code. */
  1285.  
  1286. #undef yyless
  1287. #define yyless(n) \
  1288.     do \
  1289.         { \
  1290.         /* Undo effects of setting up yytext. */ \
  1291.         yytext[yyleng] = yy_hold_char; \
  1292.         yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
  1293.         yy_hold_char = *yy_c_buf_p; \
  1294.         *yy_c_buf_p = '\0'; \
  1295.         yyleng = n; \
  1296.         } \
  1297.     while ( 0 )
  1298.  
  1299.  
  1300. /* Internal utility routines. */
  1301.  
  1302. #ifndef yytext_ptr
  1303. #ifdef YY_USE_PROTOS
  1304. static void yy_flex_strcpy( char *s1, const char *s2 )
  1305. #else
  1306. static void yy_flex_strcpy( s1, s2 )
  1307. char *s1;
  1308. const char *s2;
  1309. #endif
  1310.     {
  1311.     while ( (*(s1++) = *(s2++)) )
  1312.         ;
  1313.     }
  1314. #endif
  1315.  
  1316.  
  1317. #ifdef YY_USE_PROTOS
  1318. static void *yy_flex_alloc( unsigned int size )
  1319. #else
  1320. static void *yy_flex_alloc( size )
  1321. unsigned int size;
  1322. #endif
  1323.     {
  1324.     return (void *) malloc( size );
  1325.     }
  1326.  
  1327. #ifdef YY_USE_PROTOS
  1328. static void *yy_flex_realloc( void *ptr, unsigned int size )
  1329. #else
  1330. static void *yy_flex_realloc( ptr, size )
  1331. void *ptr;
  1332. unsigned int size;
  1333. #endif
  1334.     {
  1335.     return (void *) realloc( ptr, size );
  1336.     }
  1337.  
  1338. #ifdef YY_USE_PROTOS
  1339. static void yy_flex_free( void *ptr )
  1340. #else
  1341. static void yy_flex_free( ptr )
  1342. void *ptr;
  1343. #endif
  1344.     {
  1345.     free( ptr );
  1346.     }
  1347. # line 66 "query_l.l"
  1348.  
  1349.